/*
 * main.cpp
 *
 *  Created on: Apr 7, 2013
 *      Author: nick
 */

#include <cstdlib>
#include "hpp/chunk.hpp"

int main(int argc, char* argv[]) {

	if(argc != 3) {
		std::cout << "Usage : Sort 'inputFileName' 'outputFileName'. Quiting..." << std::endl;
		return EXIT_SUCCESS;
	}
	try {
		ChunkContainer container(argv[1], argv[2]);
		container.process(new CSVConverter(), new StandardSorter());
	} catch(std::exception & e) {
		Logging::error(e.what());
		return EXIT_FAILURE;
	}
	return EXIT_SUCCESS;
}
